package org.deng.learn.mybatis.java;


import com.alibaba.fastjson.JSON;
import org.deng.learn.mybatis.entity.User;

import java.sql.SQLException;
import java.util.List;


/**
 * @Author DengLibin
 * @Date 19-4-27
 * @Time 下午10:50
 * @Desc
 */
public class MyBatisJavaApp {

    public static  void main(String[] args) throws SQLException {
        UserDao userDao = new UserDao();
        //List<User> list = userDao.query();
        //使用通用mapper
        List<User> list = userDao.queryByCommonMapper();

       System.out.println(JSON.toJSONString(list));
      /*  User user = new User();
        user.setId(1);
        user.setName("张三");
        int i = userDao.update(user);
        System.out.println("更新结果:"+i);*/
    }
}
